<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
    <h:head>
        <title>Facelet Title</title>
    </h:head>
    <h:body>
        <ui:composition template="/templates/mainTemplate.xhtml">
            <ui:define name="content">
                <h:form>
                    <h:panelGrid columns="2">
                        <h:outputText value="E-mail:"/>
                        <p:inputText id="email" value="#{registerPageBean.email}" required="true"/>
                        <h:outputText value="Old Password:"/>
                        <p:password id="password" value="#{registerPageBean.oldPw}" required="true"/>
                        <h:outputText value="New password:"/>
                        <p:password id="newPassword" value="#{registerPageBean.newPw}" required="true"/>
                    </h:panelGrid>
                    <p:captcha id="captcha" label="Captcha"/>
                    <br/>
                    <p:commandButton ajax="false" value="Save changes" action="#{registerPageBean.changePw}">
                    </p:commandButton>
                    <p:commandButton ajax="false" value="Back to Home" action="index" immediate="true"/>
                    <p:messages id="messages"/>
                </h:form>
            </ui:define>
        </ui:composition>
    </h:body>
</html>

